<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
 [
    <#list app.getAllPSAppCodeLists() as codelist>
    {
    <#if codelist.getCodeListType() == "STATIC" && codelist.getAllPSCodeItems()??>
        "srfkey": "${codelist.codeName}",
        "emptytext": "${codelist.getEmptyText()}",
        "codelisttype":"static",
        "items": [
            <#if codelist.getAllPSCodeItems()??>
            <#list codelist.getAllPSCodeItems() as codeitem>
            <#if codeitem_index gt 0>,</#if> {
                "id": "${codeitem.getValue()?j_string}",
                "label": "${codeitem.getText()?j_string}",
                "text": "${codeitem.getText()?j_string}",
                <#if codeitem.getPSSysImage()??>
                <#assign sysimage = codeitem.getPSSysImage()/>
                <#if sysimage.getImagePath() ==  "">
                "iconcls":"${sysimage.getCssClass()}",
                <#else>
                "icon":"${sysimage.getImagePath()}",
                </#if>
                </#if>
                "class":"<#if codeitem.getPSSysCss()??>${codeitem.getPSSysCss().getCssName()}</#if>",
                "data":<#if codeitem.getData() !="">${codeitem.getData()}<#else>""</#if>,
                <#if codeitem.getCodeName()??>
                "codename":"${codeitem.getCodeName()}",
                </#if>
                <#if codeitem.getColor?? && codeitem.getColor()??>
                "color": "${codeitem.getColor()?j_string}",
                </#if>
                <#comment>判断是否为数值代码项</#comment>
                <#if codelist.isCodeItemValueNumber?? && codelist.isCodeItemValueNumber()>
                "value": ${codeitem.getValue()?j_string},
                <#if codeitem.getParentCodeItem()??><#assign parentCodeItem = codeitem.getParentCodeItem() />"pvalue": ${parentCodeItem.getValue()?j_string},</#if>
                <#else>
                "value": "${codeitem.getValue()?j_string}",
                <#if codeitem.getParentCodeItem()??><#assign parentCodeItem = codeitem.getParentCodeItem() />"pvalue": "${parentCodeItem.getValue()?j_string}",</#if>
                </#if>
                "disabled": <#if codeitem.isDisableSelect()>true<#else>false</#if>,
                "default": ${codeitem.isDefault()?c}
            }
            </#list>
            </#if>
        ]
    <#else>
        "srfkey": "${codelist.codeName}",
        "emptytext": "${codelist.getEmptyText()}",
        "codelisttype":"dynamic",
        "appdataentity":"<#if codelist.getPSAppDataEntity?? && codelist.getPSAppDataEntity()??>${codelist.getPSAppDataEntity().codeName}</#if>",
        "appdedataset":"<#if codelist.getPSAppDEDataSet?? && codelist.getPSAppDEDataSet()??>${codelist.getPSAppDEDataSet().codeName}</#if>",
        "items": []
    </#if>
    }<#if codelist_has_next>,</#if> 
    </#list>
]